package licode.unisop.types.dp;

import licode.unisop.types.BaseIdentifier;
import org.springframework.util.Assert;

public class PermissionCode implements BaseIdentifier<String> {
    private final String id;

    public PermissionCode(String id) {
        Assert.notNull(id, "权限编码为空：" + id);
        this.id = id;
    }

    @Override
    public String getId() {
        return id;
    }

    public boolean equals(PermissionCode other) {
        return id.equals(other.id);
    }
}
